package org.jeecg.modules.zhima.admin.controller;

public class Test {

    //报名费
    static final double JOIN_MONEY = 10;
    //入围积分数
    //       static final double SCORE = 20;
    static final double SCORE = 100;
//    static final double SCORE = 5;
    //积分赛人数
//        static final double JIFEN_PERSION_NUM = 20;
    static final double JIFEN_PERSION_NUM = 20000;
//    static final double JIFEN_PERSION_NUM = 5;
    //抢票赛人数
//        static final double PERSION_NUM = 2000;
//    static final double PERSION_NUM = 20000;
    static final double PERSION_NUM = 20000;

    public static void main(String[] args) {
        System.out.println("报名费："+JOIN_MONEY);
        System.out.println("入围积分数："+SCORE);
        System.out.println("积分赛人数："+JIFEN_PERSION_NUM);
        System.out.println("抢票赛人数："+PERSION_NUM);
        //单场发放积分数
        double sum = 0;
        for (int i = 1; i<=JIFEN_PERSION_NUM; i++){
            sum += JIFEN_PERSION_NUM/i;
        }
        System.out.println("单场发放积分数："+sum);
        //单场每人平均得分
        double a = sum/JIFEN_PERSION_NUM;
        System.out.println("单场每人平均得分："+a);
        //集满[SCORE]分每人参赛场次
        double b = SCORE / (sum / JIFEN_PERSION_NUM);
        System.out.println("集满"+SCORE+"分每人参赛场次："+b);
        //一轮比赛发放总分数
        double c = PERSION_NUM / JIFEN_PERSION_NUM * sum * b;
        System.out.println("一轮比赛发放总分数："+c);
        //总收入
        double d = PERSION_NUM * JOIN_MONEY * b;
        System.out.println("总收入："+d);
        //纯利润
        double e = d - c;
        System.out.println("纯利润："+e);
        //利润率
        double f = e / d;
        System.out.println("利润率："+f);

        //奖金387
        //10 20000
        //10 10000
        //10 6666
        //10 5000
//        int m = (201177-10*20000-10*10000-10*6666-10*5000);
//        System.out.printf(""+m);

//        for (int i = 1; i<=20000; i++){
//            int j = 20000/i;
//            if (j < 100){
//                System.out.printf(""+i);
//                return;
//            }
//        }
        //55场
        //1场比赛出现200人


    }
}
